import pytest,os
import yagmail

def emaill():
    ema=yagmail.SMTP(user='2314336117@qq.com',password='ixpbgkkezjwodhif',host='smtp.qq.com',port='465')
    ema.send(to='2314336117@qq.com',subject='a3mall报告',contents=['C:/Users/23143/PycharmProjects/Auto_WMS/a3mall_zdh/utils/report.html'])

if __name__ == '__main__':
    pytest.main([r'C:\Users\23143\PycharmProjects\Auto_WMS\a3mall_zdh\Case\a3mall_case.py','-s','--clean-alluredir','--alluredir=./report','--html=./report.html'])
    os.system('allure generate -o ./html ./report ./html --clean')
    emaill()